<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.prime.com.tr/ui">
<h:head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
	<link rel="stylesheet" type="text/css"
		href="../../resources/estilo.css" />
	<title>Gerenciamento de Funcionarios!</title>
</h:head>

<h:body>
	<ui:include src="menu.xhtml" />
	<div id="table">
		<h:form>
			<p:dataTable value="#{alunoManager.alunos}" var="aluno">
				<p:column>
					<f:facet name="header">
						<h:outputText value="Aluno" />
					</f:facet>
					<h:outputText value="#{aluno.nome}" />
				</p:column>
				<p:column>
					<f:facet name="header">
						<h:outputText value="E-mail" />
					</f:facet>
					<h:outputText value="#{aluno.email}" />
				</p:column>
				<p:column>
					<f:facet name="header">
						<h:outputText value="Nota 1" />
					</f:facet>
					<p:inplace >
						<p:inputText value="#{aluno.nota1}" size="1" />
					</p:inplace>

				</p:column>
				<p:column>
					<f:facet name="header">
						<h:outputText value="Nota 2" />
					</f:facet>
					<p:inplace >
						<p:inputText value="#{aluno.nota2}" size="1" />
					</p:inplace>
				</p:column>

				<p:column>
					<f:facet name="header">
						<h:outputText value="Salvar" />
					</f:facet>
					<p:commandButton action="#{professorManager.updateNota(aluno)}" value="Salvar" ajax="false"/>
				</p:column>
			</p:dataTable>
		</h:form>
	</div>
</h:body>
</html>